package com.zzl.ov_library.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName comment
 */
@TableName(value ="comment")
@Data
public class Comment implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "branch_id")
    private Integer branchId;

    /**
     * 
     */
    @TableField(value = "reserve_id")
    private Integer reserveId;

    /**
     * 
     */
    @TableField(value = "content")
    private String content;

    /**
     * 管理员回复
     */
    @TableField(value = "replay")
    private String replay;

    /**
     * 管理员回复时间
     */
    @TableField(value = "replay_time")
    private String replayTime;

    /**
     * 管理员id
     */
    @TableField(value = "replay_admin_id")
    private Integer replayAdminId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Comment other = (Comment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getBranchId() == null ? other.getBranchId() == null : this.getBranchId().equals(other.getBranchId()))
            && (this.getReserveId() == null ? other.getReserveId() == null : this.getReserveId().equals(other.getReserveId()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getReplay() == null ? other.getReplay() == null : this.getReplay().equals(other.getReplay()))
            && (this.getReplayTime() == null ? other.getReplayTime() == null : this.getReplayTime().equals(other.getReplayTime()))
            && (this.getReplayAdminId() == null ? other.getReplayAdminId() == null : this.getReplayAdminId().equals(other.getReplayAdminId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getBranchId() == null) ? 0 : getBranchId().hashCode());
        result = prime * result + ((getReserveId() == null) ? 0 : getReserveId().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getReplay() == null) ? 0 : getReplay().hashCode());
        result = prime * result + ((getReplayTime() == null) ? 0 : getReplayTime().hashCode());
        result = prime * result + ((getReplayAdminId() == null) ? 0 : getReplayAdminId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", branchId=").append(branchId);
        sb.append(", reserveId=").append(reserveId);
        sb.append(", content=").append(content);
        sb.append(", replay=").append(replay);
        sb.append(", replayTime=").append(replayTime);
        sb.append(", replayAdminId=").append(replayAdminId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}